package com.wntms.gps.service.impl;

import java.util.List;

import com.wntms.gps.dao.DriverInformationDao;
import com.wntms.gps.service.IDriverInformationService;
import com.wntms.gps.pojo.DriverInformation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 司机信息Service业务层处理
 * 
 * @author group 4
 * @date 2022-11-22
 */
@Service
public class DriverInformationServiceImpl implements IDriverInformationService
{
    @Autowired
    private DriverInformationDao driverInformationDao;

    /**
     * 查询司机信息
     * 
     * @param id 司机信息主键
     * @return 司机信息
     */
    @Override
    public DriverInformation selectDriverInformationById(Long id)
    {
        return driverInformationDao.selectDriverInformationById(id);
    }

    /**
     * 查询司机信息列表
     * 
     * @param driverInformation 司机信息
     * @return 司机信息
     */
    @Override
    public List<DriverInformation> selectDriverInformationList(DriverInformation driverInformation)
    {
        return driverInformationDao.selectDriverInformationList(driverInformation);
    }

    /**
     * 新增司机信息
     * 
     * @param driverInformation 司机信息
     * @return 结果
     */
    @Override
    public int insertDriverInformation(DriverInformation driverInformation)
    {
        driverInformation.setStatus(0);
        return driverInformationDao.insertDriverInformation(driverInformation);
    }

    /**
     * 修改司机信息
     * 
     * @param driverInformation 司机信息
     * @return 结果
     */
    @Override
    public int updateDriverInformation(DriverInformation driverInformation)
    {
        return driverInformationDao.updateDriverInformation(driverInformation);
    }

    /**
     * 批量删除司机信息
     * 
     * @param ids 需要删除的司机信息主键
     * @return 结果
     */
    @Override
    public int deleteDriverInformationByIds(Long[] ids)
    {
        return driverInformationDao.deleteDriverInformationByIds(ids);
    }

    /**
     * 删除司机信息信息
     * 
     * @param id 司机信息主键
     * @return 结果
     */
    @Override
    public int deleteDriverInformationById(Long id)
    {
        return driverInformationDao.deleteDriverInformationById(id);
    }
}
